﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="DepartRy.aspx.cs" Inherits="BasicInfo_DepartRy" %>

<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script language="javascript" type="text/javascript">
        function ShowSave() {
            noty({ "text": "保存成功！",
                "layout": "top",
                "type": "success",
                "animateOpen": { "height": "toggle" },
                "animateClose": { "height": "toggle" },
                "speed": 500,
                "timeout": 1000,
                "closeButton": false,
                "closeOnSelfClick": true,
                "closeOnSelfOver": false
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h3 class="DemoTitle">
        人员部门对照
    </h3>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <table runat="server" id="QueryTable">
            <tr>
                <td>
                    <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="人员">
                    </dx:ASPxLabel>
                </td>
                <td>
                    <dx:ASPxComboBox ID="cmdUser" runat="server" ValueType="System.String" ValueField="rybm"
                        ClientInstanceName="c_user" DataSourceID="cmdDataSource" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Spacing="0" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Font-Size="9pt" DisplayFormatString="{0}" IncrementalFilteringMode="Contains">
                        <ClientSideEvents TextChanged="function(s,e){QueryTree.PerformCallback(s.GetValue()); }" />
                        <Columns>
                            <dx:ListBoxColumn Caption="人员编码" FieldName="rybm" />
                            <dx:ListBoxColumn Caption="人员姓名" FieldName="ryxm" />
                        </Columns>
                        <ItemStyle Font-Size="9pt" />
                        <LoadingPanelImage Url="~/App_Themes/DevEx/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                    </dx:ASPxComboBox>
                </td>
                <td style="padding-left: 5px">
                    <dx:ASPxButton ID="btnSave" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                        CssPostfix="DevEx" Font-Size="10pt" SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css"
                        Text="保存" AutoPostBack="False" UseSubmitBehavior="False">
                        <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback(c_user.GetValue()); }" />
                    </dx:ASPxButton>
                </td>
            </tr>
        </table>
        <dx:ASPxCallbackPanel ID="QueryCBPanel" runat="server" OnCallback="QueryCBPanel_Callback"
            ClientInstanceName="QueryPanel">
            <ClientSideEvents EndCallback="ShowSave" />
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxTreeList ID="DxTreelist" runat="server" AutoGenerateColumns="False" ClientInstanceName="QueryTree"
                        CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" Font-Size="10pt"
                        KeyFieldName="bmbm" OnCustomCallback="DxTreelist_CustomCallback" ParentFieldName="fbmbm"
                        Width="350px">
                        <Columns>
                            <dx:TreeListTextColumn Caption="部门编号" FieldName="bmbm" ShowInCustomizationForm="True"
                                Width="150px" VisibleIndex="0">
                            </dx:TreeListTextColumn>
                            <dx:TreeListTextColumn Caption="部门名称" FieldName="bmmc" ShowInCustomizationForm="True"
                                Width="200px" VisibleIndex="1">
                            </dx:TreeListTextColumn>
                        </Columns>
                        <Settings SuppressOuterGridLines="True" />
                        <SettingsBehavior AllowFocusedNode="True" AutoExpandAllNodes="True" />
                        <SettingsPager Mode="ShowPager">
                            <Summary Text="当前第{0}页，共{1}页，{2}条记录" />
                        </SettingsPager>
                        <SettingsSelection Enabled="True" Recursive="True" />
                        <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                            <LoadingPanel Url="~/App_Themes/DevEx/TreeList/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesEditors ButtonEditCellSpacing="0">
                        </StylesEditors>
                    </dx:ASPxTreeList>
                    
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
        <asp:SqlDataSource ID="cmdDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT * FROM [css_user]"></asp:SqlDataSource>
    </div>
</asp:Content>
